#pragma once
#include "main.h"

//define
#define buffer_size 128
#define adc_num 2

//struct
//struct buffer:
typedef struct
{
  uint8_t buffer_packet[buffer_size];
  volatile uint16_t head;
  volatile uint16_t tail;
}buffer;

//variable
extern  buffer buffer_0;
extern volatile bool gend_ads1256;

//function
void FS_DMA_init(uint8_t channel,uint32_t source_address,uint32_t destination_address,uint16_t transfer_size);
void ADS_UART_init(void);
void ADS_UART_get_adc(void);